package com.sl.water.service;

import cn.hutool.json.JSONArray;
import cn.hutool.json.JSONObject;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.sl.water.entity.RehearsalScheme;
import com.sl.water.vo.FastRehearsalVO;
import com.sl.water.vo.RehearsalParamsVO;
import org.springframework.http.ResponseEntity;
import java.util.List;

public interface RehearsalSchemeService extends IService<RehearsalScheme> {

    List<RehearsalScheme> listByType(Integer type, Integer status1, Integer status2);

    boolean updateStatus(Long id, Integer status, String error,String kind);


    RehearsalScheme getByIdAndStatus(Long id, Integer status1, Integer status2);

    /**
     * 执行模型计算
     *
     * @param rehearsalScheme   预演方案
     * @param kind fh\bfh
     */
    void runModelCall(RehearsalScheme rehearsalScheme, String kind,boolean bModifyState);


    RehearsalScheme getScheme(long id);

    JSONObject cunList(long id, String kind);

    JSONObject dmList(long id, String kind);

    JSONObject yldList(long id, String kind);

    JSONArray imageList(RehearsalScheme rehearsalScheme, String kind);

    ResponseEntity<byte[]> imagePreview(String filePath);

    Long runFast(FastRehearsalVO fastRehearsalVO);

    void autoCreate();

    Page<RehearsalScheme> getFinishedList(int page, int size, String name);

    Page<RehearsalScheme> pageList(int page, int size, Integer type, Integer status1, Integer status2);

    void removeScheme(long id);

    /**
     * 获取预演方案参数
     * @param id 主键
     * @return 参数信息
     */
    RehearsalParamsVO getRehearsalParamsById(long id);
}

